package com.tistory.devdiaries.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.stereotype.Repository;

import com.tistory.devdiaries.dto.Test;

@Repository("helloDaoImpl")
public class HelloDaoImpl implements HelloDao {

	@Autowired
	SqlMapClientTemplate sqlMapClientTemplate;
	
	public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	Test test;
	
	@Override
	public List<Test> getTestList() throws SQLException {
		
		return (List<Test>)sqlMapClientTemplate.queryForList("HelloSql.getTestList", test);
	}
	
}
